package com.tjbank.cssys.mybatis.mapper;

import com.tjbank.cssys.mybatis.entity.IamGroup;
import com.tjbank.cssys.mybatis.entity.IamGroupKey;
import com.tjbank.cssys.mybatis.sqlbuilder.IamGroupSqlBuilder;

import java.util.List;
import java.util.Map;

/**
 * IamGroupMapper
 * 
 * @author PG(Auto Generator)
 * @version V2.0
 */
public interface IamGroupMapper {

    /**
     * 根据SqlBuilder查询列表，返回值包含大字段栏位
     * 
     * @param iamGroupSqlBuilder
     * @return
     * @throws Exception
     */
    public List<IamGroup> selectBySqlBuilderWithBLOBs(IamGroupSqlBuilder iamGroupSqlBuilder) throws RuntimeException;

    /**
     * 根据SqlBuilder查询列表，返回值不包含大字段栏位
     * 
     * @param iamGroupSqlBuilder
     * @return
     * @throws Exception
     */
    public List<IamGroup> selectBySqlBuilder(IamGroupSqlBuilder iamGroupSqlBuilder) throws RuntimeException;

    /**
     * 根据主键查询单个对象
     * 
     * @param iamGroupKey
     * @return
     * @throws Exception
     */
    public IamGroup selectByPrimaryKey(IamGroupKey iamGroupKey) throws RuntimeException;

    /**
     * 根据SqlBuilder统计记录条数
     * 
     * @param iamGroupSqlBuilder
     * @return
     * @throws Exception
     */
    public long countBySqlBuilder(IamGroupSqlBuilder iamGroupSqlBuilder) throws RuntimeException;

    /**
     * 单条插入新增记录
     * 
     * @param iamGroup
     * @return
     * @throws Exception
     */
    public int insert(IamGroup iamGroup) throws RuntimeException;

    /**
     * 批量插入新增记录
     * 
     * @param listIamGroup
     * @return
     * @throws Exception
     */
    public int insertUseBatch(List<IamGroup> listIamGroup) throws RuntimeException;

    /**
     * 根据SqlBuilder更新记录，空值会持久化到数据库
     * 
     * @param iamGroupSqlBuilder
     * @return
     * @throws Exception
     */
    public int updateBySqlBuilder(IamGroupSqlBuilder iamGroupSqlBuilder) throws RuntimeException;

    /**
     * 根据SqlBuilder更新记录，空值不会持久化到数据库
     * 
     * @param iamGroupSqlBuilder
     * @return
     * @throws Exception
     */
    public int updateBySqlBuilderSelective(IamGroupSqlBuilder iamGroupSqlBuilder) throws RuntimeException;

    /**
     * 根据主键更新记录，空值会持久化到数据库
     * 
     * @param iamGroupKey
     * @return
     * @throws Exception
     */
    public int updateByPrimaryKey(IamGroupKey iamGroupKey) throws RuntimeException;

    /**
     * 根据主键更新记录，空值不会持久化到数据库
     * 
     * @param iamGroupKey
     * @return
     * @throws Exception
     */
    public int updateByPrimaryKeySelective(IamGroupKey iamGroupKey) throws RuntimeException;

    /**
     * 根据SqlBuilder删除记录
     * 
     * @param iamGroupSqlBuilder
     * @return
     * @throws Exception
     */
    public int deleteBySqlBuilder(IamGroupSqlBuilder iamGroupSqlBuilder) throws RuntimeException;

    /**
     * 根据主键删除记录
     * 
     * @param iamGroupKey
     * @return
     * @throws Exception
     */
    public int deleteByPrimaryKey(IamGroupKey iamGroupKey) throws RuntimeException;



    public int  getCodeOrName(Map<String,String> map);
}